Skip to content

Fix/unable to decode negative zero int#136

Open
nickccm1122 wants to merge 2 commits into
francoispqt:masterfrom
nickccm1122:fix/unable-to-decode-negative-int
Open

Fix/unable to decode negative zero int#136
nickccm1122 wants to merge 2 commits into
francoispqt:masterfrom
nickccm1122:fix/unable-to-decode-negative-int

Conversation

@nickccm1122

Copy link
Copy Markdown

Why

Currently this is unable to decode json with value -0(it throws error). However, {"key": -0} should be a valid JSON and gojay should be able to decode it.

What is changed

  • Found that float decoder allows to decode {"key": -0.0}. So I have change the getInt64Negative that it also allow to accept 0
  • add -0 test case for decode_number_int
  • add -0.0 test case for decode_number_float

@codecov-io

codecov-io commented Dec 23, 2019

Copy link
Copy Markdown

Codecov Report

Merging #136 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files          38       38           
  Lines        5323     5323           
=======================================
  Hits         5321     5321           
  Misses          1        1           
  Partials        1        1
Impacted Files Coverage Δ
decode_number_int.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1398296...b2c358e. Read the comment docs.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.96%. Comparing base (1398296) to head (b2c358e).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files          38       38           
  Lines        5323     5323           
=======================================
  Hits         5321     5321           
  Misses          1        1           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants